/**
 * Created by lobin on 2017/7/24.
 */
import { Application } from 'egg';
import * as moment from 'moment';
export default (app: Application) => {
  const mongoose = app.mongoose;
  const schema = new mongoose.Schema({
    ctime: { type: String, default: moment().format('YYYY-MM-DD HH:mm:ss'), required: true },
    name: { type: String, required: true, unique: true },
    pinyin: { type: String, required: true },
    icon: String,
  });
  return mongoose.model('Expresscompany', schema, 'expresscompany');
};
